import request from '@/utils/request'

// 查询预收单列表
export function listAdvanceReceipt(query) {
  return request({
    url: '/payfee/advanceReceipt/list',
    method: 'get',
    params: query
  })
}

// 查询预收单详细
export function getAdvanceReceipt(madvanceReceiptId) {
  return request({
    url: '/payfee/advanceReceipt/' + madvanceReceiptId,
    method: 'get'
  })
}

// 导出预收单
export function exportAdvanceReceipt(query) {
  return request({
    url: '/payfee/advanceReceipt/export',
    method: 'get',
    params: query
  })
}

// 通过房屋IDS获取预收金额
export function getAdvanceMoney(roomIds) {
  return request({
    url: '/payfee/advanceReceipt/getAdvanceMoney/' + roomIds ,
    method: 'get'
  })
}

// 查询余额冲抵记录列表
export function listAgainstRecord(query) {
  return request({
    url: '/payfee/advanceReceipt/againstRecordList',
    method: 'get',
    params: query
  })
}

//预收退款
export function advanceRefund(madvanceReceiptIds) {
  return request({
    url: '/payfee/advanceReceipt/advanceRefund/' + madvanceReceiptIds ,
    method: 'get'
  })
}

//预收款余额
export function getAmountRemaining(data) {
  return request({
    url: '/payfee/advanceReceipt/getAmountRemaining',
    method: 'post',
    data: data
  })
}

